import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:getx_tutorial/app/modules/login/login_controller.dart';
import 'package:getx_tutorial/app/routes/app_pages.dart';

class LoginPage extends GetView<LoginController> {

  @override
  Widget build(BuildContext context) {

    return Scaffold(
      appBar: AppBar(
        title: Text('LoginPage'),
        actions: [
          InkWell(
            onTap: () {
              Get.offNamed(Routes.INITIAL);
            },
            child: Icon(Icons.home),
          )
        ],
      ),

      body: SafeArea(
        child: ListView(
          children: [
            ListTile(
              title: Text('回退'),
              onTap: () {
                Get.back();
              }
            )
          ],
        )
      )
    );
  }
}